<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<html>
<head>
<title>:: FINIAC ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="../script/jquery-1.7.1.min.js" type="text/javascript"></script>

<link href="../css/styles.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function() {
	var passwordMismatch = getUrlVars()["passwordMismatch"];
	var passwordLength = getUrlVars()["passwordLength"];
	var someError = getUrlVars()["someError"];
	var success = getUrlVars()["success"];
	if(passwordMismatch)
	{
	$('#messageSpan').text("Passwords not matching");
	 $("#message").fadeIn("slow");
	    $("#message a.close-notify").click(function() {
	        $("#message").fadeOut("slow");
	        return false;
	    });	
	}
	else if(passwordLength)
		{
		$('#messageSpan').text("Length of password should be greater than 6");
		 $("#message").fadeIn("slow");
		    $("#message a.close-notify").click(function() {
		        $("#message").fadeOut("slow");
		        return false;
		    });	
		}
	else if(someError)
	{
	$('#messageSpan').text("Some error had occured. Try again");
	 $("#message").fadeIn("slow");
	    $("#message a.close-notify").click(function() {
	        $("#message").fadeOut("slow");
	        return false;
	    });	
	}
	else if(success)
	{
	$('#messageSpanSuccess').text("Password Changed successfully");
	 $("#messageSuccess").fadeIn("slow");
	    $("#messageSuccess a.close-notify").click(function() {
	        $("#messageSuccess").fadeOut("slow");
	        return false;
	    });	
	}
	
});
function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
#message {
    font-family:Arial,Helvetica,sans-serif;
    position:fixed;
    top:0px;
    left:0px;
    width:100%;
    z-index:105;
    text-align:center;
    font-weight:bold;
    font-size:100%;
    color:white;
    padding:10px 0px 10px 0px;
    background-color:#8E1609;
}
#messageSuccess {
    font-family:Arial,Helvetica,sans-serif;
    position:fixed;
    top:0px;
    left:0px;
    width:100%;
    z-index:105;
    text-align:center;
    font-weight:bold;
    font-size:100%;
    color:white;
    padding:10px 0px 10px 0px;
    background-color:#04B404;
}
#message span {
    text-align: center;
    width: 95%;
    float:left;
}

.close-notify {
    white-space: nowrap;
    float:right;
    margin-right:10px;
    color:#fff;
    text-decoration:none;
    border:2px #fff solid;
    padding-left:3px;
    padding-right:3px
}

.close-notify a {
    color: #fff;
}


</style></head>

<body>
<div id='message' style="display: none;">
    <span id='messageSpan'>Hey, This is my Error Message.</span>
    <a href="#" class="close-notify">X</a>
</div>
<div id='messageSuccess' style="display: none;">
    <span id='messageSpanSuccess'>Hey, This is my  Success Message.</span>
    <a href="#" class="close-notify">X</a>
</div>
<form action="changePassword.htm">
<table width="100%" border="0">
  <tr>
    <td><span class="heading"><a href="main.html" class="Bredcrumbs">Settings</a> &gt;&gt;</span></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="9"><img src="../images/Tright_03_01.gif" width="9" height="29"></td>
        <td background="../images/Tcenter.gif" class="body" ><strong class="boxheader"> Change password</strong></td>
        <td width="10" ><img src="../images/Tright_1_01.gif" width="9" height="29"></td>
      </tr>
      <tr>
        <td height="19" valign="top" background="../images/Tright_03_03.gif"></td>
        <td height="20" class="news"><div align="right" class="mandatoryfield">*Mandatory fields</div></td>
        <td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      <tr>
        <td height="19" valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" class="news"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td ><img src="../images/01.gif" width="5" height="5" /></td>
            <td width="914" background="../images/02.gif"></td>
            <td><img src="../images/03.gif" width="5" height="5" /></td>
          </tr>
          <tr>
            <td width="5"  background="../images/left.gif"></td>
            <td valign="top"><table width="100%" cellspacing="1" cellpadding="2">
              <tr >
                  <td height="30" class="row-odd" size="350px" ><div align="right"><span class="mandatoryfield">*</span>Current password : </div></td>
                  <td><input name="currentPassword" type="password" class="textboxCopy" id="currentPassword" value="" size="29"></td>
                 
                              
                </tr>
                <tr>
                 <td height="26" class="row-odd"><div align="right" ><span class="mandatoryfield">*</span>New password :</div></td>
                 <td><input name="newPassword1" type="password" class="textboxCopy" id="newPassword1" value="" size="29"></td>
                 
                </tr>
                
                <tr>
                 <td height="26" class="row-odd"><div align="right" ><span class="mandatoryfield">*</span>Confirm new password :</div></td>
                 <td><input name="newPassword2" type="password" class="textboxCopy" id="newPassword2" value="" size="29"></td>
                 
                </tr>
                
           
            </table></td>
            <td width="5" height="30"  background="../images/right.gif"></td>
          </tr>
          <tr>
            <td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
            <td background="../images/05.gif"></td>
            <td><img src="../images/06.gif" /></td>
          </tr>
        </table></td>
        <td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      <tr>
        <td height="19" valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" class="news"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="47%" height="35"><div align="right">
              <input name="button2" type="submit" class="formbutton" value="Submit" OnClick="'"/>
            </div></td>
            <td width="1%"></td>
           
            <td width="1%"></td>
            <td width="46%"><input type="reset" class="formbutton" value="Reset" /></td>
          </tr>
        </table> </td>
        <td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      
      <tr>
        <td height="10" valign="top" background="../images/Tright_03_03.gif"></td>
        <td valign="top" class="news">&nbsp;</td>
        <td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
      </tr>
      <tr>
        <td><img src="../images/Tright_03_05.gif" width="9" height="29"></td>
        <td width="0" background="../images/TcenterD.gif"></td>
        <td><img src="../images/Tright_02.gif" width="9" height="29"></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>